This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
RE: WebQuerySave agent and explicit save (Why not?) ~Phil Reboosiskilen 12.Jan.04 04:58 PM a Web browser Applications Development All ReleasesAll Platforms
Hey Morten,
Well I got a first for you, because my save method does return true. After a few minutes of making a few additional tests, I discovered something interesting.
I wrote up the simplest WebQuerySave Agent which is the following:
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dim s As New NotesSession
Dim doc As NotesDocument
Set doc = s.DocumentContext
If doc.Save(True, True) Then
Print "Document Saved"
Else
Print "Document NOT Saved"
End If
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
THE RESULTS: You were right, the save method returned false.
At this point I said to myself "What the heck is going on!", because the save method in my real application did return true. After examining my initial script and a few tests, I discovered that simply adding the line doc.SaveOptions = "1" before calling the save, made my save method return True.
For example, the save method of the following script does return true (and the only difference with the previous script is the doc.SaveOptions = "1" line.
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dim s As New NotesSession
Dim doc As NotesDocument
Set doc = s.DocumentContext
doc.SaveOptions = "1" '<<<<<<<< new line
If doc.Save(True, True) Then
Print "Document Saved"
Else
Print "Document NOT Saved"
End If
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Have any suggestions, ideas of what might be going on.